import request from "@/utils/request.js";
import utils from "@/utils/utils.js"
export default {
	updatePassword(params) {
		return request({
			url: 'system/user/profile/updatePwd?' + utils.jsonToQuery(params),
			method: 'put',
			data: params
		})
	},
	updatePayPassword(params) {
		return request({
			url: 'system/user/profile/updatePayPwd',
			method: 'put',
			data: params
		})
	},
	getUserInfo(params) {
		return request({
			url: 'system/user/profile',
			method: 'get',
			data: params
		})
	},
	modifyUserInfo(params) {
		return request({
			url: "system/user/profile",
			method: "PUT",
			data: params
		})
	},
	scoreList(params) {
		return request({
			url: 'user/score/list',
			method: 'get',
			data: params
		})
	},
	scoreBalance(params) { // 用户燃料余额查询
		return request({
			url: 'user/score/scoreBalance',
			method: 'get',
			data: params
		})
	},
	recommendReward() { // 用户余额查询
		return request({
			url: 'user/score/recommendReward',
			method: 'GET'
		})
	},
	statisticsByDirectType() { // 用户余额查询
		return request({
			url: 'user/score/statisticsByDirectType',
			method: 'GET'
		})
	},
	statisticsByCommunityType() { // 用户余额查询
		return request({
			url: 'user/score/statisticsByCommunityType',
			method: 'GET'
		})
	},
	directUserReward() { // 用户余额查询
		return request({
			url: 'user/score/directUserReward',
			method: 'GET'
		})
	},
	invite() { // 社区
		return request({
			url: 'project/charge/invite',
			method: 'GET'
		})
	},
	getBalance() { // 获取欧意余额
		return request({
			url: 'okex/getBalance',
			method: 'GET'
		})
	},
	putApiKey(params) {
		return request({
			url: "system/user/addKey?" + utils.jsonToQuery(params),
			method: "PUT",
			// params: params
		})
	},
	// 绑定银行卡
	bindBankCard(params) {
		return request({
			url: 'system/bank',
			method: 'post',
			data: params
		})
	},
	// 修改银行卡
	editBankCard(params) {
		return request({
			url: 'system/bank',
			method: 'put',
			data: params
		})
	},
	// 删除银行卡
	deleteBankCard(id) {
		return request({
			url: 'system/bank/' + id,
			method: 'delete',
		})
	},
	// 已绑定银行卡
	hasBindBankCard(params) {
		return request({
			url: 'system/bank/my/list',
			method: 'get',
			data: params
		})
	},
	balanceList(params) {
		return request({
			url: 'system/userls/my/list',
			method: 'get',
			data: params
		})
	},
	getMoney(params) {
		return request({
			url: 'system/user/getMoney',
			method: 'get',
			data: params
		})
	},
	getName1(params) {
		return request({
			url: 'api/merchant/merchant?merchantId=' + params.id,
			method: 'get',
			data: "",
			header: {
				isToken: false
			}
		})
	}
}
